package com.genloong.flycloud.notifycenter.controller;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.genloong.flycloud.common.bean.VO.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class PublishController {
    @Resource
    Client  client;
    @RequestMapping(value = "test",method = RequestMethod.GET)
    public String sddd(){
        return "dsdddd";
    }
    @PostMapping("downloadFile")
    public JSONObject downloadFile(@RequestBody JSONArray files){
        return client.downloadFile(files);
    }


}
@FeignClient("flycloud-filecenter")
interface Client {
    @PostMapping("bizFile/downloadFile")
    JSONObject downloadFile(@RequestBody JSONArray files);
}

